package uvt.map.graph;

import java.util.ArrayList;

import uvt.map.JMapViewer;

public class Route implements Drawable {
	
	private ArrayList<Drawable> routeElements;
	private double distance;
	private int time;
	
	public Route() {
		routeElements = new ArrayList<Drawable>();
	}
	
	public void addRouteElement(Drawable dr) {
		routeElements.add(dr);
	}
	
	public void removeRouteElement(Drawable dr) {
		routeElements.remove(dr);
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	public int getTime() {
		return time;
	}

	public void setTime(int time) {
		this.time = time;
	}
	
	public void draw(JMapViewer map) {
		for(Drawable element : routeElements) {
			element.draw(map);
		}
	}

}
